﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Reckoning
{
    /// <summary>
    /// Interaction logic for StopWordsWindow.xaml
    /// </summary>
    public partial class StopWordsWindow : Window, IView
    {
        public StopWordsWindow()
        {
            InitializeComponent();         
        }

        public void SetModel(object obj)
        {
            DataContext = obj;            
        }

        // Pressing the Edit button for stop words list twice made the program crash because
        // once closed, a window can't be shown/hidden again. A pedestrian solution till I think
        // of something better.
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Hide();
            e.Cancel = true;
        }             
    }
}
